package com.lychee.moli.entity;

import java.io.Serializable;

/**
 * Created by Lychee on 2018/4/10 09:04.
 * <p>
 * Author:Hejingzhou
 * <p>
 * Email:tcowork@163.com
 */
public class BaseResultEntity<T> implements Serializable {
    public static final int ERROR_CODE_SUCCESS = 0;
    public static final int ERROR_CODE_FAIL = 1;
    private int errorCode;
    private T data;
    private String message;

    public BaseResultEntity(int errorCode, T data, String message) {
        this.errorCode = errorCode;
        this.data = data;
        this.message = message;
    }

    public BaseResultEntity() {
    }

    public static int getErrorCodeSuccess() {
        return ERROR_CODE_SUCCESS;
    }

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
